﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Packet_AC_A
{
    public partial class frm_AddNew : Form
    {
        public frm_AddNew()
        {
            InitializeComponent();
        }

        public static List<string> Grab()
        {
            frm_AddNew _Form = new frm_AddNew();
            _Form.ShowDialog();

            List<String> List = new List<String>();
            foreach (DataGridViewRow item in _Form.dataGridView1.Rows)
            {
                if (string.IsNullOrWhiteSpace((string)item.Cells[0].Value))
                {
                }
                else
                {
                    List.Add("Dim " + (string)item.Cells[0].Value + " As " + (string)item.Cells[1].Value);
                }
            }
            return List;
        }

        private void btnAccept_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        private void btmCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }
    }
}